package com.chen.test;

public class User {

  /*  标准的JavaBean类
            类名需要见名知意
    成员变量使用private修饰
            提供至少两个构造方法
    无参构造方法
            带全部参数的构造方法
    成员方法
    提供每一个成员变量对应的setXxx()/getXxx()如果还有其他行为，也需要写上
    */

    // 属性
    private String name;
    private String password;
    private String email;
    private String gender;
    private int age;

    // 空参
    public User(){}

    // 带全部参数的构造方法
    public User(String name, String password, String email, String gender, int age){
        this.name = name;
        this.password = password;
        this.email = email;
        this.gender = gender;
        this.age = age;
    }

    // get和set方法
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return name;
    }

    // 快捷键：alt+insert

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
